import request from './request'

// 登录校验
export const validateUser = (params) => request.post('/gongyi/admin/login', params);
//邮件发送
export const sendEmail = (email) => request.put(`/gongyi/common/sendEmail?receiver=${email}`)
// export const deleteById = (params) => request.delete('/api/test',{params}) must be an object
//deleteFile
export const deleteFile = (name) => request.delete(`/gongyi/common/delete?name=${name}`)
//修改管理员信息
export const modify = (params) => request.put('/gongyi/admin/modify', params);
//获取验证码
export const getCodeImg = (params) => request.get('/gongyi/common/verify');
// 注册 +修改
export const saveOrUpdate = (params) => request.put('/gongyi/admin/saveOrUpdate', params);
// 查询
export const query = (params) => request.get('/gongyi/admin/page', {params});
// 密码找回
export const changePass = (params) => request.post(`/gongyi/admin/change?username=${params.username}&newPassword=${params.newPassword}&email=${params.email}`);
//状态更改
export const adminStatus = (params) => request.post(`/gongyi/admin/status?id=${params.id}&status=${params.status}`)
//删除
export const deleteById = (ids) => request.delete(`/gongyi/admin/delete?ids=${ids}`)